package cn.yunhe.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class Printer implements Serializable {
    /*@Autowired
    @Qualifier(value = "b5")*/
    @Resource(name = "b5")
    private Paper paper;
    @Autowired
    @Qualifier(value = "blackInk")
    private Ink ink;

    public void printInfo() {
        System.out.print("正在使用");
        paper.paperInfo();
        System.out.print("和");
        ink.inkInfo();
        System.out.print("打印证件照");
    }
}
